<?php

namespace backend\models\form;

use yii\base\Model;

class AdminUserForm extends Model {

    public $username; //工号
    public $realname; //真实姓名
    public $phone; //手机
    public $status; //状态
    public $role; //角色
    public $user_id; //用户id
    public $store_code ;//所属门店
    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['username','store_code'], 'string'],
            [['realname'], 'string'],
            [['phone'], 'integer'],
            [['status'], 'integer'],
            [['role'], 'string'],
            [['user_id'], 'integer'],
            [
                ['username','realname','phone','status','role','user_id','store_code'],
                'filter','filter'=>'\yii\helpers\HtmlPurifier::process'
            ]
        ];
    }

    public function attributeLabels() {
        return [
            'username'=>'工号',
            'realname'=>'真实姓名',
            'phone'=>'手机',
            'status'=>'状态',
            'role'=>'角色',
            'user_id'=>'id',
            'store_code' => '所属门店'
        ] ;
    }
}
